home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / demo / gcp_24.exe / MAIN.FR_ / MAIN.FR
Text File  |  1994-04-28  |  4KB  |  113 lines

  1. VERSION 2.00
  2. Begin MDIForm frmMDI 
  3.    Caption         =   "VT-220 Control Demo from Dart"
  4.    ClientHeight    =   5025
  5.    ClientLeft      =   1275
  6.    ClientTop       =   2730
  7.    ClientWidth     =   9630
  8.    Height          =   5685
  9.    Icon            =   MAIN.FRX:0000
  10.    Left            =   1230
  11.    LinkTopic       =   "MDIForm1"
  12.    Top             =   2115
  13.    Width           =   9720
  14.    Begin Menu mnuFile 
  15.       Caption         =   "&File"
  16.       Begin Menu mnuFNew 
  17.          Caption         =   "&New..."
  18.       End
  19.       Begin Menu mnuBlank1 
  20.          Caption         =   "-"
  21.       End
  22.       Begin Menu mnuFExit 
  23.          Caption         =   "E&xit"
  24.       End
  25.    End
  26.    Begin Menu mnuHelp 
  27.       Caption         =   "&Help"
  28.       Begin Menu mnuHAbout 
  29.          Caption         =   "&About..."
  30.       End
  31.    End
  32. End
  33. Declare Function WritePrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lplFileName As String) As Integer
  34. Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer
  35. Declare Function GetPrivateProfileInt Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal nDefault As Integer, ByVal lpFileName As String) As Integer
  36.  
  37. Sub MDIForm_Load ()
  38.  
  39. '*********************************************************************************************
  40. '* Variables for messaging - DNW
  41. '*********************************************************************************************
  42. Const MB_OK = 0, MB_OKCANCEL = 1  ' Define buttons.
  43. Const MB_ICONEXCLAMATION = 48, MB_ICONINFORMATION = 64
  44. Dim DgDef, msg, Response, title ' Declare variables.
  45.  
  46. Dim Tmp As String * 80
  47. Dim Temp As String
  48. On Error GoTo mdiform_load_error
  49.  
  50. FIndex = 0
  51.     ' Application starts here (Load event of Startup form).
  52.     ' Always set working directory to directory containing the application.
  53.     
  54.     ' Icon shows us closed
  55.     Icon = LoadPicture("net09a.ico")
  56.     
  57.     'Initialize document form arrays, and show first document.
  58.     ReDim Document(1)
  59.     ReDim FState(1)
  60.     FState(1).Deleted = True
  61.     'get main window size if any, or use defaults
  62.     'Left = GetPrivateProfileInt(AppName, "Left", frmMDI.Left, IniFile)
  63.     'Width = GetPrivateProfileInt(AppName, "Width", frmMDI.Width, IniFile)
  64.     'Top = GetPrivateProfileInt(AppName, "Top", frmMDI.Top, IniFile)
  65.     'Height = GetPrivateProfileInt(AppName, "Height", frmMDI.Height, IniFile)
  66.     WindowState = 0
  67.     Show
  68.  
  69.     CenterForm frmMDI, NewSession
  70.     NewSession.Show 1
  71.     
  72.     Exit Sub
  73.  
  74.  
  75. '*********************************************************************************************
  76. '* Error handling routine for the mdi form load
  77. '*********************************************************************************************
  78. mdiform_load_error:
  79.   title = "Err"
  80.   msg = "An error occurred starting.  The error is: " & Error(Err) & "."
  81.   DgDef = MB_OK + MB_ICONEXCLAMATION  ' Describe dialog.
  82.   Response = MsgBox(msg, DgDef, title)  ' Get user response.
  83. End Sub
  84.  
  85. Sub MDIForm_QueryUnload (Cancel As Integer, UnloadMode As Integer)
  86.     ExitFlag = True
  87.     Unload frmMDI
  88. End Sub
  89.  
  90. Sub MDIForm_Unload (Cancel As Integer)
  91.     FIndex = 0
  92.     Unload ConnectDlg
  93.     End
  94. End Sub
  95.  
  96. Sub mnuFExit_Click ()
  97.     Unload Me
  98. End Sub
  99.  
  100. Sub mnuFNew_Click ()
  101.     CenterForm frmMDI, NewSession
  102.     NewSession.Show 1
  103. End Sub
  104.  
  105. Sub mnuHAbout_Click ()
  106.     frmAbout.Show 1
  107. End Sub
  108.  
  109. Sub mnuHContents_Click ()
  110.     r = Shell("WinHelp.exe vt220fwg.hlp")
  111. End Sub
  112.  
  113.